package cn.zhf.shop.service;

import cn.zhf.shop.entity.Message;
import cn.zhf.shop.entity.Refund;
import org.springframework.stereotype.Service;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.List;

@Valid
@Service
public interface RefundService {

    Message<?> insert(@Valid Refund r);

    Message<Refund> selectByOrderId(@NotBlank(message = "OrderId不得为空")String orderId);

    Message<List<Refund>> selectAll();

    Message<List<Refund>> selectByUserId(@NotBlank(message = "userId不得为空")String userId);

    Message<List<Refund>> selectByState(@NotBlank(message = "state不得为空")Integer state);

    Message<List<Refund>> selectByUserIdAndState(@NotBlank(message = "userId不得为空")String userId,@NotBlank(message = "state不得为空") Integer state);

    Message<?> updateState(@NotBlank(message = "orderId不得为空")String orderId,@NotBlank(message = "state不得为空")Integer state);





}
